import request from '@/utils/request'

const commonPrefix = 'webApi/admin';

export function fetchList(params) {
  return request({
    url: commonPrefix + '/returnReason/list',
    method:'get',
    params:params
  })
}

export function deleteReason(params) {
  return request({
    url:commonPrefix + '/returnReason/delete',
    method:'post',
    params:params
  })
}

export function updateStatus(params) {
  return request({
    url:commonPrefix + '/returnReason/update/status',
    method:'post',
    params:params
  })
}

export function addReason(data) {
  return request({
    url:commonPrefix + '/returnReason/create',
    method:'post',
    data:data
  })
}

export function getReasonDetail(id) {
  return request({
    url:commonPrefix + '/returnReason/'+id,
    method:'get'
  })
}

export function updateReason(id,data) {
  return request({
    url:commonPrefix + '/returnReason/update/'+id,
    method:'post',
    data:data
  })
}